get last index C#

40

get last index C# -

//Before C# 8
var last = array[array.Length - 1];

//After C# 8
var last = array[^1];

Comments

Submit
0 Comments